<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends ComController {


    public function index(){
    	$map="XH=".$_SESSION['xh'];
    	$user=M('xs_sy_jbgr')->where($map)->find();
    	$this->assign('user',$user);
		$this->display('');
    }
    
    public function edituser(){
    	
    	$map="XH=".$_SESSION['xh'];
    	$user=M('xs_sy_jbgr')->where($map)->find();
    	$this->assign('user',$user);
        // print_r($user);
        // exit;
        $this->assign($user);
		$this->display('');
    }
    public function typography(){
        $map="XH=".$_SESSION['xh'];
        $Model=M('xs_dc_sy_jyxx');
        $user=M('dc_sy_yx44107')->where($map)->find();
        $val=array_values($user);
        $count= floor(count($val)/2);
        $arr=array();
        for($i=0;$i<$count;$i++){
            $arr[$i]=$i;
        }
        // 获取字段注释
        $sql="SELECT COLUMN_NAME,COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'cx_xs_dc_sy_jyxx' AND TABLE_SCHEMA ='01'";
        $col_comment=M()->query($sql);
        // print_r($col_comment);
        // exit;
        $this->assign("arr",$arr);
        $this->assign("val",$val);
        $this->assign("col_comment",$col_comment);
        $this->assign($user);
        // print_r($user);
        // exit;
        $this->display('');
    } 
    public function save(){
        
    }

 

}

